import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/searchview",
    name: "searchview",
    component: () => import("../views/SearchView.vue"),
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/LoginView.vue"),
  },
  {
    path: "/register",
    name: "register",
    component: () => import("../views/RegisterView.vue"),
  },
  {
    path: "/forget",
    name: "forget",
    component: () => import("../views/ForgetView.vue"),
  },
  {
    path: "/songplay",
    name: "songplay",
    component: () => import("../views/SongPlay.vue"),
  },









  {
    path: "*",
    name: "error",
    component: () => import("../views/ErrorView.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
